import {customeStruct} from '../utils';
const itf = customeStruct.interface;

export const InitDataStruct = itf({
    payload: itf({
        isCompanyUser: 'boolean',
    })
});

const content = {
    id: 'string',
    dealerCode: 'string',
    dealerName: 'string',
    subDealerCode: 'string',
    subDealerName: 'string',
    maintenanceNumber: 'number',
    vin: 'string',
    salesDate: 'string',
    mileage: 'number',
};

export const List = itf({
    payload: itf({
        content: [itf(Object.assign(content))]
    })
});

export const Detail = itf({
    payload: itf({
        id: 'string',
        code: 'string?|null',
        dealerCode: 'string',
        dealerName: 'string',
        subDealerCode: 'string',
        subDealerName: 'string',
        repairOrder: 'string',
        vin: 'string',
        salesDate: 'string',
        maintainDate: 'string',
        mileage: 'number',
        remark: 'string?|null',
        createTime: 'string?|null',
        rowVersion: 'string'
    })
});
export const SelectList = itf({
    payload: itf({
        content: [itf(Object.assign({
            id: 'string',
        }))],
    })
});
